<template>
  <div class="container">
    
    <div id="qrcode"></div> <!-- 创建一个div，并设置id为qrcode -->
    <div id="code">
      <p>名称：</p>
      <p>型号：</p>
      <p>项目名称：</p>
    </div>
  </div>
</template>
   
<script>
import QRCode from 'qrcodejs2'  // 引入qrcode
import {getCookie} from '@/utils/cookie'
export default {
  data(){
    return{
      text:'123',
    }
  },
  mounted () {
    this.qrcode();
  },
  methods: {
    qrcode() {
      let qrcode = new QRCode('qrcode', {
        width: 132,  
        height: 132,
        text:'123' , // 二维码地址
        colorDark : "#000",
        colorLight : "#fff",
      })
    },
     
  }
}
</script>
<style scoped>
.container{
  display: flex;
  text-align: center;
  justify-content: space-around;
}

  
</style>